﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EVEAPI.Server
{
	public class ServerStatus : APIbase
	{
		public bool ServerOpen { get; set; }
		public int OnlinePlayers { get; set; }

		public ServerStatus()
			: base(string.Empty, string.Empty, @"http://api.eve-online.com/server/ServerStatus.xml.aspx", false)
		{
		}

		protected override void LoadData()
		{
			ServerOpen = Convert.ToBoolean(_result["serverOpen"].InnerXml);
			OnlinePlayers = int.Parse(_result["onlinePlayers"].InnerXml);
		}

		public override bool Read()
		{
			return Refresh(new Hashtable());
		}
	}
}
